//
//  ZPNextViewController.m
//  ZPIOSEducation
//
//  Created by mini1 on 2016/11/25.
//  Copyright © 2016年 liwei. All rights reserved.
//

#import "ZPNextViewController.h"
#import "ZPTDTableViewCell11.h"
#import "ZPTDTableViewCell12.h"

@interface ZPNextViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *listTableView;

@end

@implementation ZPNextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"课程";
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [_listTableView registerNib:[UINib nibWithNibName:@"ZPTDTableViewCell11" bundle:nil] forCellReuseIdentifier:@"ZPTDTableViewCell11"];
    [_listTableView registerNib:[UINib nibWithNibName:@"ZPTDTableViewCell12" bundle:nil] forCellReuseIdentifier:@"ZPTDTableViewCell12"];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 200;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row%2==0) {
        ZPTDTableViewCell11 *cell = [tableView dequeueReusableCellWithIdentifier:@"ZPTDTableViewCell11"];
        return cell;
    }else{
        ZPTDTableViewCell12 *cell = [tableView dequeueReusableCellWithIdentifier:@"ZPTDTableViewCell12"];
        return cell;
    }
    return nil;
}

@end
